import { ApiCall } from "tsrpc";
import { ReqRestar, ResRestar } from "../shared/api_backend/PtlRestar";
import sdk from "../core";

export default async function (call: ApiCall<ReqRestar, ResRestar>) {
    // 保存数据并重启服务器
    call.succ({});
    await sdk.save();
    // 存档完成后立即重启
    process.exit(1);
}